//
// Created by pengx on 2025/9/26.
//

#ifndef GB28181_SDP_PARSER_HPP
#define GB28181_SDP_PARSER_HPP

#include <string>
#include <regex>

struct SdpStruct {
    std::string remote_ip;
    int remote_port = 0;
    std::string ssrc; // 流标识
    int local_port = 0;
};

class SdpParser {
public:
    static SdpStruct parse(const std::string &sdp);

    static std::string buildSdpAnswer(const std::string &device_code,
                                      const std::string &local_ip,
                                      int &local_port,
                                      const std::string &ssrc);
};


#endif //GB28181_SDP_PARSER_HPP
